---
layout: example
categories: example/v1.0.0
version: v1.0.0
title: Draggable marker
description: Create a marker a user can drag to a new location.
tags:
  - ui
  - markers
---
<div id='map'></div>

<script>
var map = L.mapbox.map('map', 'mapbox.streets')
    .setView([37.9, -77],4);

var marker = L.marker(new L.LatLng(37.9, -77), {
    icon: L.mapbox.marker.icon({
        'marker-color': 'ff8888'
    }),
    draggable: true
});

marker.bindPopup('This marker is draggable! Move it around.');
marker.addTo(map);
</script>
